package com.slug.dao.mapper;

import java.util.ArrayList;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.com.mangrove.commons.jdbc.MybatisRepository;

import com.slug.dao.entity.OsProduct;
import com.slug.po.CategoryVO;
import com.slug.po.HotCategoryVO;
@MybatisRepository
public interface OsProductMapper {
    int deleteByPrimaryKey(Long productId);

    int insert(OsProduct record);

    int insertSelective(OsProduct record);

    OsProduct selectByPrimaryKey(Long productId);

    int updateByPrimaryKeySelective(OsProduct record);

    int updateByPrimaryKey(OsProduct record);
    
    List<OsProduct> getHotProduct(CategoryVO vo);
    
    ArrayList<HotCategoryVO> getAllCategory();
    
    OsProduct selectByProductNumber(Long productNumber);

    Long selectProductNumberByProductId(Long productId);

    String selectNameByProductId(Long productId);

    String selectPicImgByProductId(Long productId);

    OsProduct getProductBySpecNumber(Long productSpecNumber);

    List<OsProduct> listByPage(@Param("categoryIds" +
            "") List<String> categoryIds);
    List<OsProduct> selectAll();
}